package team.knowers.qzh.qzhadmin.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import team.knowers.qzh.qzhadmin.config.convention.result.Result;
import team.knowers.qzh.qzhadmin.config.convention.result.Results;
import team.knowers.qzh.qzhadmin.dto.resp.AllSectionRespDTO;
import team.knowers.qzh.qzhadmin.service.SectionAdminService;

import java.util.List;

@RestController
@RequiredArgsConstructor
public class SectionAdminContrpller {
    private final SectionAdminService sectionAdminService;
    @GetMapping("/api/qzh-admin/admin/v1/grame/section/allshow")
    public Result<List<AllSectionRespDTO>> showSection(@RequestParam("id") Long id) {
        return Results.success(sectionAdminService.showSection(id));
    }
}
